package com.emagic.manage.mvp.presenters;


import com.emagic.manage.mvp.views.InterfaceView;

/**
 * 视图层接口,定义视图生命周期方法
 *
 * @author baoy
 * @version 1.0
 *          Create by 15/12/14 上午11:14
 */
public interface Presenter {

    /**
     * Method that control the lifecycle of the view. It should be called in the view's
     * (Activity or Fragment) onResume() method.
     */
    void onResume();

    /**
     * Method that control the lifecycle of the view. It should be called in the view's
     * (Activity or Fragment) onPause() method.
     */
    void onPause();


    /**
     * Method that control the lifecycle of the view. It should be called in the view's
     * (Activity or Fragment) onDestroy() method.
     */
    void onDestroy();

    /**
     * @param v
     */
    void attachView(InterfaceView v);

}
